import request from "@/api/myRequest"
// 用户列表
function findUsersByPage(start, limit) {
    return request({
        url: `/lejuAdmin/member/findMembersByPage/${start}/${limit}`,
        method: 'GET',
    })
}
// 获取限时活动列表
function findAllRecommends() {
    return request({
        url: `/lejuAdmin/homeRecommend/findAllRecommends`,
        method: 'GET'
    })
}
// 删除限时活动
function delRecommend(recommendId) {
    return request({
        url: `/lejuAdmin/homeRecommend/delRecommend/${recommendId}`,
        method: 'DELETE',
    })
}
// 删除广告
function delAds(adsId) {
    return request({
        url: `/lejuAdmin/advertise/delAds/${adsId}`,
        method: 'DELETE',
    })
}
// 添加限时活动/lejuAdmin/homeRecommend/addRecommend
function addRecommend(data) {
    return request({
        url: `/lejuAdmin/homeRecommend/addRecommend`,
        method: 'POST',
        data
    })
}
//获取商品列表
function productsByPage(start, limit, data) {
    return request({
        url: `/lejuAdmin/product/productsByPage/${start}/${limit}`,
        method: 'POST',
        data
    })
}
//品牌列表/lejuAdmin/brand/findAllBrand
function findAllBrand() {
    return request({
        url: `/lejuAdmin/brand/findAllBrand`,
        method: 'GET',
    })
}
//广告列表
function adsList() {
    return request({
        url: `/lejuAdmin/advertise/adsList`,
        method: 'GET',
    })
}

// 添加广告/lejuAdmin/advertise/addAds
function addAds(data) {
    return request({
        url: `/lejuAdmin/advertise/addAds`,
        method: 'POST',
        data
    })
}
//更新广告
function updateAds(data) {
    return request({
        url: `/lejuAdmin/advertise/updateAds`,
        method: 'POST',
        data
    })
}
export {
    findUsersByPage, findAllRecommends, delRecommend, addRecommend, productsByPage, findAllBrand,adsList,addAds,updateAds,delAds
}